package com.beanCopy;

import org.springframework.beans.BeanUtils;

/**
 * Created by dong peng on 2020/8/12.
 */
public class UserConvertor {

    public static UserBO userDO2BO(UserDO userDO) {
        UserBO userBO = new UserBO();
        BeanUtils.copyProperties(userDO, userBO);

        CarBO carBO = new CarBO();
        BeanUtils.copyProperties(userDO.getCarDO(),carBO);
        carBO.setTypeEnum(com.beanCopy.co.TypeEnum.one);
        userBO.setCarBO(carBO);

        return userBO;
    }
}
